package cn.fsd.exception;

import cn.fsd.expection.AppExceptionCodeMsg;

public enum CustomerExceptionCodeMsg implements AppExceptionCodeMsg {

    CUSTOMER_INTEGRITY(10001,"Customer对象中的Not NULL字段存在空字段"),
    CUSTOMER_INSERT_FAIL(10002,"客户信息新增失败"),
    CUSTOMER_UPDATE_FAIL(10003,"客户信息更新失败，可能该客户信息不存在"),
    CUSTOMER_DELETE_FAIL(10004,"客户信息删除失败，可能该客户信息不存在"),
    CUSTOMER_DELETE_FAIL_ASSOCIATION(10005,"客户信息删除失败，有关联的订单信息"),

    ADDRESS_INTEGRITY(10101,"Customer_Address对象中的Not NULL字段存在空字段"),
    ADDRESS_INSERT_FAIL(10102,"地址信息新增失败"),
    ADDRESS_DELETE_FAIL(10103,"地址信息删除失败，可能地址信息不存在"),
    ADDRESS_UPDATE_FAIL(10104,"地址信息更新失败，可能地址信息不存在"),
    ADDRESS_0_CANNOT_DELETE(10105,"0号地址信息不允许直接删除"),
    ADDRESS_0_CANNOT_UPDATE(10106,"0号地址信息不允许直接修改"),
    ADDRESS_0_CANNOT_ADD(10107,"0号地址信息不允许直接新增"),

    ORDER_CANNOT_CANCEL(10207,"订单状态不是缺货，可分配或挂起，不能被撤销"),
    ORDER_CANNOT_HANDLE(10208, "订单状态不是缺货，不能分配货物"),
    ORDER_CANNOT_EXCHANGE(10209,"订单状态不是已完成，不能进行退换货"),
    ORDER_ALREADY_EXCHANGE(10210,"订单已经进行过退换货，不能再次进行退换货");
    private final Integer code;
    private final String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    CustomerExceptionCodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
